﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LunarSF.SHomeWorkshop.LunarMarkdownEditor
{
    public class TableLine
    {
        public string LineText { get; set; } = "";

        public TableLineType Type { get; set; } = TableLineType.Normal;

        public List<string> Cells { get; } = new List<string>();

        public HeaderOrBodyType HeaderOrBodyType { get; set; } = HeaderOrBodyType.BodyLine;
    }

    public enum TableLineType
    {
        Normal,
        /// <summary>
        /// 应当被合并到上一行。如果上一行也是同类，则继续寻找更上一行，直到首行。
        /// </summary>
        MergeLine,
        /// <summary>
        /// 列对齐定义文本行。
        /// </summary>
        ColumnDefinitionLine,
    }

}
